package com.sdppf.action;
import java.net.URLDecoder;
import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.sdppf.domain.Developer;
import com.sdppf.domain.Project;
import com.sdppf.service.DeveloperService;
import com.sdppf.service.ProjectService;
import com.sdppf.tools.EncodingTool;

public class ProjectAction extends ActionSupport{
	private static final long serialVersionUID = 1L;
	private List<Developer> developers;
	private DeveloperService developerService;
	private ProjectService projectService;
	private Project project;
	@Override
	public String execute() throws Exception {
		this.developers=this.developerService.queryDevelopers();
		return SUCCESS;
	}
	public String createProject() throws Exception
	{
		project=EncodingTool.utf8ToGbk(project);
		project=EncodingTool.utf8ToGbk(project);
		project.setStatus("立项");
		this.projectService.createProject(project);
		return null;
	}
	public List<Developer> getDevelopers() {
		return developers;
	}
	public DeveloperService getDeveloperService() {
		return developerService;
	}
	public ProjectService getProjectService() {
		return projectService;
	}
	public void setDevelopers(List<Developer> developers) {
		this.developers = developers;
	}
	public void setDeveloperService(DeveloperService developerService) {
		this.developerService = developerService;
	}
	public void setProjectService(ProjectService projectService) {
		this.projectService = projectService;
	}
	public void setProject(Project project) {
		this.project = project;
	}
	public Project getProject() {
		return project;
	}
}
